import 'package:flutter/material.dart';
import 'package:flutter_mvvm_demo/page/home/model/home_product_model.dart';

///
/// 商品 view
///
class ProductView extends StatelessWidget {
  final HomeProductModel model;

  const ProductView({Key? key, required this.model}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Card(
      child: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Text("商品id => ${model.num}"),
            Text("商品名称 => ${model.name}"),
            Text("价格 => ${model.price}"),
          ],
        ),
      ),
    );
  }
}
